package com.springbootforest.client;

import com.dtflys.forest.annotation.DataVariable;
import com.dtflys.forest.annotation.Get;
import org.springframework.stereotype.Repository;

import java.util.Map;

@Repository
public interface MyClient {
    // localtion是指目标地址的经度和纬度
    @Get(url = "http://api.caiyunapp.com/v2.5/你的令牌/${localtion}/realtime.json")
    Map getWeather(@DataVariable("localtion")String localhost);
}
